home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "Cell Formatting Example"
- ClientHeight = 5310
- ClientLeft = 1200
- ClientTop = 1545
- ClientWidth = 7575
- Height = 5775
- Icon = "format1.frx":0000
- Left = 1110
- LinkTopic = "Form1"
- ScaleHeight = 5310
- ScaleWidth = 7575
- Top = 1170
- Width = 7755
- Begin VB.CommandButton cmdFormat
- Caption = "3D Effects 2"
- Height = 375
- Index = 15
- Left = 5940
- TabIndex = 17
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "3D Effects 1"
- Height = 375
- Index = 14
- Left = 5940
- TabIndex = 16
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "List 3"
- Height = 375
- Index = 13
- Left = 4560
- TabIndex = 15
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "List 2"
- Height = 375
- Index = 12
- Left = 4560
- TabIndex = 14
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "List 1"
- Height = 375
- Index = 11
- Left = 4560
- TabIndex = 13
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 4"
- Height = 375
- Index = 10
- Left = 3180
- TabIndex = 12
- Top = 4740
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 3"
- Height = 375
- Index = 9
- Left = 3180
- TabIndex = 11
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 2"
- Height = 375
- Index = 8
- Left = 3180
- TabIndex = 10
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Colorful 1"
- Height = 375
- Index = 7
- Left = 3180
- TabIndex = 9
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Accounting 3"
- Height = 375
- Index = 6
- Left = 1800
- TabIndex = 8
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Accounting 2"
- Height = 375
- Index = 5
- Left = 1800
- TabIndex = 7
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Accounting 1"
- Height = 375
- Index = 4
- Left = 1800
- TabIndex = 6
- Top = 3660
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Classic 3"
- Height = 375
- Index = 3
- Left = 420
- TabIndex = 5
- Top = 4740
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Classic 2"
- Height = 375
- Index = 2
- Left = 420
- TabIndex = 4
- Top = 4380
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Classic 1"
- Height = 375
- Index = 1
- Left = 420
- TabIndex = 3
- Top = 4020
- Width = 1215
- End
- Begin VB.CommandButton cmdFormat
- Caption = "Simple"
- Height = 375
- Index = 0
- Left = 420
- TabIndex = 2
- Top = 3660
- Width = 1215
- End
- Begin VB.Label Label1
- Caption = $"format1.frx":044A
- BeginProperty Font
- name = "Arial"
- charset = 0
- weight = 400
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 240
- TabIndex = 1
- Top = 60
- Width = 7035
- WordWrap = -1 'True
- End
- Begin VCIF1Lib.F1Book F1Book1
- Height = 2595
- Left = 120
- TabIndex = 0
- Top = 900
- Width = 7335
- _version = 65536
- _extentx = 12938
- _extenty = 4577
- _stockprops = 96
- borderstyle = 1
- appname = ""
- filename = "format1.frx":0524
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub cmdFormat_Click(Index As Integer)
- With F1Book1
- '' To make this work with any selection you will want to enable
- '' selections, scrollbars, and remove the following 2 lines.
- '' Then this example will work with the active selection. You
- '' should do some error checking to ensure the selection is
- '' proper - contains all required Ranges according to the
- '' Cell_Formatting Module instructions.
- .SetSelection 2, 2, 8, 6
- .BackColor = .PaletteEntry(2)
- '' All functions below preserve the initial seleciton
- Select Case Index
- Case 0: ' Simple
- Call FormatCells(F1Book1, SIMPLE)
-
- Case 1: ' Classic 1
- Call FormatCells(F1Book1, CLASSIC1)
-
- Case 2: ' Classic 2
- Call FormatCells(F1Book1, CLASSIC2)
- Case 3: ' Classic 3
- Call FormatCells(F1Book1, CLASSIC3)
-
- Case 4:
- Call FormatCells(F1Book1, ACCOUNTING1)
-
- Case 5:
- Call FormatCells(F1Book1, ACCOUNTING2)
-
- Case 6:
- Call FormatCells(F1Book1, ACCOUNTING3)
-
- Case 7: ' Colorful 1
- Call FormatCells(F1Book1, COLORFUL1)
-
- Case 8: ' Colorful 2
- Call FormatCells(F1Book1, COLORFUL2)
-
- Case 9: ' Colorful 3
- Call FormatCells(F1Book1, COLORFUL3)
-
- Case 10: ' Colorful 4
- Call FormatCells(F1Book1, COLORFUL4)
-
- Case 11: ' List 1
- Call FormatCells(F1Book1, LIST1)
-
- Case 12: ' List 2
- Call FormatCells(F1Book1, LIST2)
-
- Case 13: ' List 3
- Call FormatCells(F1Book1, LIST3)
-
- Case 14: ' 3D Effects 1
- Call FormatCells(F1Book1, EFFECTS3D1)
-
- Case 15: ' 3D Effects 2
- Call FormatCells(F1Book1, EFFECTS3D2)
-
- End Select
-
- End With
-
- End Sub
-